﻿using Observer.Observer;
using System;
using System.Collections.Generic;
using System.Text;

namespace Observer
{
    public class Executor
    {
        public Executor()
        {
            Init();
        }

        public  event Action handExcute ;
        public void Init()
        {
            //注册观察者
            FirObserver firobserver = new FirObserver();
            handExcute += () => { firobserver.Excut();};
        }


        public void Excuted()
        {
            if (handExcute != null)
            {
                this.handExcute.Invoke();
            }    
        }

    }
}
